package com.hue.springbootmysql.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hue.springbootmysql.domain.City;
import com.hue.springbootmysql.vo.CityVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CityDao extends BaseMapper<City> {
    //调用存储函数
    @Select("select fun_demo(#{cId})")
    Integer cityCountByCId(int cId);

    //查询视图
    @Select("select * from city_country")
    List<CityVo> cityVoList();
}
